Ext.define('AmpleHarvest.views.article.eventHandler.cWindowEvents',
{
	extend				: 'Ext.AbstractComponent',
	requires			:
	[
		"Ext.window.MessageBox"
	],
	uses				: [],
	m_obj_Windows		: null,
	m_obj_MsgBus		: null,
	m_obj_Desktop		: null,
	statics				:
	{
		C_STR_EVENT_ARTICLE_PAGE_NEXT_ACTIVATE		: "doarticlepagenextactivate",
		C_STR_EVENT_ARTICLE_PAGE_PREVIOUS_ACTIVATE	: "doarticlepagepreviousactivate",
		C_STR_EVENT_ARTICLE_PAGE_CHANGE				: "doarticlepagechange"
	},

	initComponent		: function()
	{
		var obj_This = this;

		this.m_obj_MsgBus.addEvents(
				this.self.C_STR_EVENT_ARTICLE_PAGE_NEXT_ACTIVATE,
				this.self.C_STR_EVENT_ARTICLE_PAGE_CHANGE,
				this.self.C_STR_EVENT_ARTICLE_PAGE_PREVIOUS_ACTIVATE,
				this.self.C_STR_EVENT_ARTICLE_PAGE_PREVIOUS
		);

		this.m_obj_MsgBus.on(this.self.C_STR_EVENT_ARTICLE_PAGE_CHANGE,
				this.articlePageChange, this
		);

		obj_This.callParent();
	},

	articlePageChange	: function(str_ID, str_Server)
	{
		m_obj_AmpleHarvest_ViewPort.fireEvent(
				AmpleHarvest.eventHandler.cWindowEvents.C_STR_EVENT_REDIRECT,
				str_Server, str_ID
		);
	}
}
);